/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.common.core.enums;

import org.apache.commons.lang3.StringUtils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 * 业务事件类型
 * @author zhanghongyi
 * @date 2024/7/5 14:07
 * @description BizEventTypeEnum
 */
@Getter
@AllArgsConstructor
public enum BizEventTypeEnum {
    /**
     * 默认事件
     */
    DEFAULT_EVENT("DEFAULT_EVENT", "默认事件"),

    ;
    private final String code;
    private final String desc;

    public static BizEventTypeEnum getByCode(String code) {
        for (BizEventTypeEnum value : values()) {
            if (StringUtils.equals(value.code, code)) {
                return value;
            }
        }
        return null;
    }
}
